The present invention relates to a method of automatically producing a numerical calculation program for calculating a physical quantity which is defined by a partial differential equation, in a specified analytic domain under predetermined boundary conditions.
In order to solve a partial differential equation by numerical calculation, an analytic domain is divided into a plurality of small portions (namely, meshes), and an approximate value of a physical quantity which is defined by the partial differential equation, is determined at each of the vertices of the meshes. The vertices of the meshes are usually called "discrete points".
In order to obtain the above approximate value, a multiplicity of linear equations each indicating a relation between the value of the physical quantity at a discrete point in the analytic domain and the values of the physical quantity at neighboring discrete points, are formed from the partial differential equation and the boundary conditions.
The simultaneous linear equations thus obtained are solved to determine the value of the physical quantity at each discrete point.
The formation of the linear equations from the partial differential equation and boundary conditions is called "discretization", and the linear equations thus obtained are called "discretized equations". In more detail, each of the terms, which are included in the partial differential equation and have a differential operator, is replaced by a linear equation indicating a relation between the value of the physical quantity at a discrete point and the values of the physical quantity at neighboring discrete points, to eliminate a partial differential operator of the above term. This replacement is called "discretization of the above partial differential operator". In a case where the linear equation thus obtained still includes a partial differential operator, the discretization of this partial differential operator is carried out in a manner similar to the above-mentioned. The discretization can be carried out in various methods, one of which uses control volumes.
The discretization method using control volumes is described, for example, on pages 66 to 82 of the Journal of Computational Physics, Vol. 62, 1986. According to this method, as shown in FIG. 1 of the accompanying drawings, a rectangular analytic domain 130 is divided into a plurality of meshes, and a plurality of control volumes 501A and so on are formed so that each control volume contains one of the vertices of the meshes (namely, one discrete point). In each control volume, a partial differential equation is integrated so that discretization is carried out. Further, for a discrete point B existing on the boundary line of the analytic domain 130, a control volume 501B whose size is one half the size of the control volume 501A, is formed so that the discrete point B exists on one side of the rectangular control volume 501B. In the control volume 501B, the partial differential equation is integrated, to be discretized. At this time, an integrated term on the boundary line is replaced by a boundary condition. In the above case, a term having a differential operator indicative of the divergence of an operand such as a differential operator "div" is integrated and then discretized by using the integration by parts. The discretization method using control volumes will hereinafter be referred to as the "control volume method".
It is known that the control volume method can produce discretized equations which have an excellent calculation accuracy. However, the discretization according to the control volume method has hitherto been carried out manually, and thus it requires a great deal of labor to finish this discretization. Accordingly, it is desired to carry out the discretization automatically.
The technology for automatically producing a program which can solve a partial differential equation,
is disclosed in U.S. Pat. Nos. 4,972,334, 4,841,479, and 4,819,161, each of which is assigned to the present assignee. Further, the above technology is disclosed in a publication entitled "Advanced Implicit Solution of Function of DEQSOL and it's Evaluation" (IEEE computer reprint, 1986, by Chisato Konno).
The discretization method used in the above-mentioned technology, however, is different from the control volume method, and hence the above technology cannot be applied to the control volume method, as it is.
When the discretization using control volumes is carried out, each of differential operators .differential./.differential.x, .differential./.differential.y and .differential./.differential.z indicates the divergence or gradient of an operand, depending upon whether the equation of continuity or the Navier-Stokes' equation is used as the inputted partial differential equator, or whether the advection term or the diffusion term has the differential operator, and it is required to process the differential operator in accordance with the actual function thereof.
That is, it is a problem of the control volume method that the discretization has to be carried out in a favorable manner in accordance with the partial differential equation used and the partial differential operator included therein. Further, it is another problem of the control volume method how boundary conditions are treated in discretizing the partial differential equation.